import { defHttp } from "@/utils/http";

// ERP 资产图片 VO
export interface AssetImagesVO {
	id: number; // 主键
	asmId: number; // 资产ID
	sqNumb: number; // 图片顺序
	imgType: number; // 图片类型
	img: string; // 图片
}

// ERP 资产图片 API
export const AssetImagesApi = {
	// 查询资产图片分页
	getAssetImagesPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/asm-imgs/page`, params });
	},

	// 查询资产图片详情
	getAssetImages: async (id: number) => {
		return await defHttp.get({ url: `/whs/asm-imgs/get?id=` + id });
	},

	// 新增资产图片
	createAssetImages: async (data: AssetImagesVO) => {
		return await defHttp.post({ url: `/whs/asm-imgs/create`, data });
	},

	// 修改资产图片
	updateAssetImages: async (data: AssetImagesVO) => {
		return await defHttp.put({ url: `/whs/asm-imgs/update`, data });
	},

	// 删除资产图片
	deleteAssetImages: async (id: number) => {
		return await defHttp.delete({
			url: `/whs/asm-imgs/delete?id=` + id
		});
	},

	// 导出资产图片 Excel
	exportAssetImages: async (params: any) => {
		return await defHttp.download({ url: `/whs/asm-imgs/export-excel`, params });
	}
};
